home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
AUTOCAD
/
3078B.ZIP
/
PGRUN991.ZIP
/
HEXBOLT.LSP
< prev
next >
Wrap
Lisp/Scheme
|
1991-05-20
|
10KB
|
350 lines
; ******* ParaDraft Application ********
; Parametric Geomtry Program generated by PgPg!
; Authored by : User
; Application name : Hexagonal head bolt
; Dated : Monday , 20-5-1991
; Started at : -- 14:58:30
; Finished at : -- 15:00:06
; ****************************************
(princ "\nParaDraft application generated on Monday , 20-5-1991 with Professional Version 1.0P")
(mode 0)(command "VSLIDE"(strcat *pgpg-dir* *pg-name*))
(setq dia14 nil rad5 nil rad6 nil rad7 nil ang10 nil ang11 nil L1 nil L2 nil L3 nil L4 nil L8 nil L9 nil L12 nil L13 nil )
(take-value 'dia14 "dia14" 14.89022364)
(take-value 'rad5 "rad5" 119.34777005)
(take-value 'rad6 "rad6" 25.34592075)
(take-value 'rad7 "rad7" 25.34595145)
(take-value 'ang10 "ang10" 32.49750163)
(take-value 'ang11 "ang11" 32.49814745)
(take-value 'L1 "L1" 33.39259975)
(take-value 'L2 "L2" 60.1547)
(take-value 'L3 "L3" 79.12930556)
(take-value 'L4 "L4" 41.4612)
(take-value 'L8 "L8" 91.68790011)
(take-value 'L9 "L9" 55.02420011)
(take-value 'L12 "L12" 33.4209)
(take-value 'L13 "L13" 16.6311995)
(command "REDRAW")
(initget 1)
(setq refpt (getpoint "\nInsertion point :"))
(setq refangle (getval "\nInsertion angle:" 0.0))
(princ "Computing points ..please wait")
(setq *en*
(init refpt))(setq *dim-layer* "dim")(setq *cen-layer* "cen")
(setq err 0.0)
(command "COLOR""BYLAYER")
(command "DIM1""DIMASZ" 0.01 )
(command "DIM1""DIMTXT" 0.01 )
(setvar "CMDECHO" 0)(MAKE_LAYER "CEN" 2)(setq RAD14(/ DIA14 2.0))
(setq ANG10(D2R ANG10 ))
(setq ANG11(D2R ANG11 ))
(setq L15 (/ L2 2.0) )
(setq L16 L15 )
(setq L17 (/ L3 2.0) )
(setq L18 L17 )
(setq L19 (/ L4 2.0) )
(setq L20 L19 )
(setq L21 (/ L12 2.0) )
(setq L22 L21 )
(setq pt1(delta refpt
0.0
0.0
))
(setq pt4(delta refpt
( + (x-of pt1) L17)
(y-of pt1)
))
(setq pt5(delta refpt
( + (x-of pt1) ( - L18 ))
(y-of pt1)
))
(setq pt20(polar
pt1
0.0
L19
))
(setq pt8(delta refpt
(x-of pt1)
( + (y-of pt1) L1)
))
(setq pt10(polar
pt1
0.0
L15
))
(setq pt12(delta refpt
( + (x-of pt1) L15)
( + (y-of pt1) L1)
))
(setq pt19(polar
pt1
0.0
( - L16 )
))
(setq pt21(polar
pt1
0.0
( - L20 )
))
(setq pt17(delta refpt
( + (x-of pt1) ( - L16 ))
( + (y-of pt1) L1)
))
(setq pt23(delta refpt
( + (x-of pt1) L21)
( + (y-of pt1) ( - L8 ))
))
(setq pt24(delta refpt
(x-of pt1)
( + (y-of pt1) ( - L8 ))
))
(setq pt37(polar
pt1
0.0
L21
))
(setq pt29(delta refpt
( + (x-of pt1) ( - L22 ))
( + (y-of pt1) ( - L8 ))
))
(setq pt38(polar
pt1
0.0
( - L22 )
))
(setq pt32(delta refpt
(x-of pt1)
( + (y-of pt1) L13)
))
(setq pt34(delta refpt
( + (x-of pt1) L19)
( + (y-of pt1) L13)
))
(setq pt39(delta refpt
( + (x-of pt8) rad5)
(y-of pt8)
))
(setq pt40(delta refpt
( + (x-of pt12) rad6)
(y-of pt12)
))
(setq pt41(delta refpt
( + (x-of pt17) rad7)
(y-of pt17)
))
(setq pt25(delta refpt
( + (x-of pt1) L21)
( + L9 (y-of pt23))
))
(setq pt27(delta refpt
( + (x-of pt1) L19)
( + L9 (y-of pt23))
))
(setq pt28(delta refpt
( + (x-of pt1) ( - L20 ))
( + L9 (y-of pt23))
))
(setq pt30(delta refpt
( + (x-of pt1) ( - L22 ))
( + L9 (y-of pt23))
))
(setq pt42(delta refpt
( + (x-of pt32) rad14)
(y-of pt32)
))
(setq pt6(intersect
(make-arc pt8 pt39 )
(make-line pt1 1.57079633 )
'-
))
(setq pt7(intersect
(make-arc pt6 pt8 )
(make-line pt20 1.57079633 )
'+
))
(setq pt15(intersect
(make-arc pt6 pt8 )
(make-line pt21 1.57079633 )
'+
))
(setq pt26(intersect
(make-line pt1 1.57079633 )
(make-line pt25 0.0 )
Nil
))
(setq pt43(midpt
pt7
pt12
))
(setq pt44(delta refpt
( + (x-of pt7) rad6)
(y-of pt7)
))
(setq pt13(intersect
(make-arc pt12 pt40 )
(make-line pt10 1.57079633 )
'-
))
(setq pt22(intersect
(make-line pt20 1.57079633 )
(make-line pt23 (chg-quad ( - 1.57079633 ANG10
)) )
Nil
))
(setq pt45(midpt
pt15
pt17
))
(setq pt46(delta refpt
( + (x-of pt15) rad7)
(y-of pt15)
))
(setq pt14(intersect
(make-arc pt17 pt41 )
(make-line pt19 1.57079633 )
'-
))
(setq pt31(intersect
(make-line pt21 1.57079633 )
(make-line pt29 (chg-quad ( + 1.57079633 ANG11
)) )
Nil
))
(setq pt11(intersect
(make-arc pt13 pt7 )
(make-line pt4 1.57079633 )
'+
))
(setq pt16(intersect
(make-arc pt14 pt15 )
(make-line pt5 1.57079633 )
'+
))
(princ "Computed points\n")(gc)
(make_layer "cen" 1)
(make_layer "0" 1)
(make_layer "dim" 1)
(make_layer "0" 1)
(command "LINE" pt4 pt1 "" )
(command "LINE" pt5 pt1 "" )
(command "LINE" pt11 pt4 "" )
(command "LINE" pt8 pt12 "" )
(command "LINE" pt8 pt17 "" )
(command "LINE" pt16 pt5 "" )
(command "LINE" pt7 pt20 "" )
(command "LINE" pt15 pt21 "" )
(command "LINE" pt20 pt22 "" )
(command "LINE" pt23 pt24 "" )
(command "LINE" pt22 pt23 "" )
(setq ent1 (entlast))(command "LINE" pt23 pt25 "" )
(setq ent2 (entlast))(command "LINE" pt26 pt27 "" )
(command "LINE" pt26 pt28 "" )
(command "LINE" pt29 pt30 "" )
(setq ent3 (entlast))(command "LINE" pt31 pt29 "" )
(setq ent4 (entlast))(command "LINE" pt29 pt24 "" )
(command "LINE" pt21 pt31 "" )
(command "CIRCLE" pt32 rad14)
(setq ent5 (entlast))(command "ARC""C" pt6 pt7 pt8)
(setq ent6 (entlast))(command "ARC""C" pt13 pt11 pt7)
(setq ent7 (entlast))(command "ARC""C" pt14 pt15 pt16)
(setq ent8 (entlast))(command "ARC""C" pt6 pt8 pt15)
(draw-cline pt1 195.0771 1.57079633 ) (make-cline pt32 rad14)
(setq *detailing* T) (init refpt)
(setq L23 17.17889944 )
(command "DIM1""HORIZ" pt21 pt20 (setq pt47(polar
pt21
1.57079633
( - L23 )
)) "")
(setq L24 53.7482 )
(command "DIM1""VERT" pt20 pt23 (setq pt48(polar
pt20
0.0
L24
)) "")
(command "DIM1""diameter" (list ent5 (polar pt32 0.78539816 10.0))"")
(command "DIM1""DIMASZ" 3.0 )
(command "DIM1""DIMTXT" 3.0 )
(command "DIM1""UPDATE"(getset) "" )
( command "CHANGE""P" "" "LAYER" *dim-layer* )
(rotate-it refpt refangle)
(princ "\n Drawing created by a ParaDraft application")(mode 1) ( setq refpt nil
pt1 nil
pt2 nil
pt3 nil
pt4 nil
pt5 nil
pt6 nil
pt7 nil
pt8 nil
pt9 nil
pt10 nil
pt11 nil
pt12 nil
pt13 nil
pt14 nil
pt15 nil
pt16 nil
pt17 nil
pt18 nil
pt19 nil
pt20 nil
pt21 nil
pt22 nil
pt23 nil
pt24 nil
pt25 nil
pt26 nil
pt27 nil
pt28 nil
pt29 nil
pt30 nil
pt31 nil
pt32 nil
pt33 nil
pt34 nil
pt35 nil
pt36 nil
pt37 nil
pt38 nil
pt39 nil
pt40 nil
pt41 nil
pt42 nil
pt43 nil
pt44 nil
pt45 nil
pt46 nil
pt47 nil
pt48 nil
L1 nil
L2 nil
L3 nil
L4 nil
L8 nil
L9 nil
L12 nil
L13 nil
L15 nil
L16 nil
L17 nil
L18 nil
L19 nil
L20 nil
L21 nil
L22 nil
L23 nil
L24 nil
)
(gc) (princ) ; Program generated at : -- 15:00:13